<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/template-web.js"></script>
  <script src="../js/jquery.min.js">
  </script>
  <style>

  </style>
</head>

<body>

  <div id="a"></div>
  <div type="text/html" id="str" style="display: none;">
    <h1>{{name}}</h1>
  </div>

  <script>
    const data = {
      name: 'zp'
    }
    const htmlStr = template('str', data)
    $("#a").html(htmlStr)
  </script>
</body>

</html>